﻿#ifndef IOT_H
#define IOT_H

#include <QObject>
#include<QNetworkAccessManager>
#include<QJsonObject>
#include<QNetworkRequest>
#include<QNetworkReply>
#include<QEventLoop>
#include<QString>
#include<QJsonDocument>
#include"MQTT.h"

class iot : public QObject
{
    Q_OBJECT
public:
    explicit iot(QObject *parent = nullptr);

    QString getAccessToken();
    bool getDeviceStatus(const QString &token);
    QJsonObject getDeviceShadowData(const QString &token);
    QString sendCommandToDevice(const QString& token,QStringList&stl);
signals:



private:
    QNetworkAccessManager*networkManager;
};

#endif // IOT_H
